import { RouteRecordRaw } from 'vue-router';
// 导出几个页面
export const staticRoutes: Array<RouteRecordRaw> = [
    {
        path: '/', // 路由地址
        name: '/', // 名称
        // 创建src/views文件夹，存放页面
        // 创建index.vue组件
        // component: () => import('../../src/views/index/index.vue'), //对应页面组件
        // 为了方便引用，对vite.config.ts 新增一些resolve.alias 路径别名配置 @以后代表 ./src
        component: () => import('@/views/index/index.vue'), //对应页面组件
        meta: {
            // 自定义, 根据业务需要
            title: '初始页面',
        },
        /**
        * 回 src/router/index.ts
        */
    },
    // 再来几个页面
    // 双向绑定demo
    {
        path: '/model',
        name: 'model',
        component: () => import('@/views/model/index.vue'), //对应页面组件
        meta: {
            title: '双向绑定',
        },
    },
    {
        path: '/if',
        name: 'if',
        component: () => import('@/views/if/index.vue'), //对应页面组件
        meta: {
            title: '条件渲染',
        },
    },
    {
        path: '/v-for',
        name: 'v-for',
        component: () => import('@/views/v-for/index.vue'), //对应页面组件
        meta: {
            title: '列表渲染',
        },
    },
    {
        path: '/component',
        name: 'component',
        component: () => import('@/views/component/index.vue'), //对应页面组件
        meta: {
            title: '组件',
        },
    },
    {
        path: '/slot',
        name: 'slot',
        component: () => import('@/views/slot/index.vue'), //对应页面组件
        meta: {
            title: '插槽',
        },
    },
    {
        path: '/componentModel',
        name: 'componentModel',
        component: () => import('@/views/componentModel/index.vue'), //对应页面组件
        meta: {
            title: '自定义组件使用v-model实现双向绑定',
        },
    },
    {
        path: '/useWindowResize',
        name: 'useWindowResize',
        component: () => import('@/views/useWindowResize/index.vue'), //对应页面组件
        meta: {
            title: '自定义hook',
        },
    },
    {
        path: '/keepalive',
        name: 'keepalive',
        component: () => import('@/views/keepalive/index.vue'), //对应页面组件
        meta: {
            title: 'keepalive缓存页面状态',
        },
    },
    {
        path: '/table',
        name: 'table',
        component: () => import('@/views/table/index.vue'), //对应页面组件
        meta: {
            title: 'table表格',
        },
    }
]